package com.bytedance.common.plugin.interfaces.pushmanager.setting;

import android.content.Context;

import com.bytedance.common.plugin.interfaces.pushmanager.setting.PushMultiProcessSharedProvider.MultiProcessShared;

public class RedbadgeSetting {
    public static final String DESKTOP_RED_BADGE_ARGS = "desktop_red_badge_args";
    public static final String IS_DESKTOP_RED_BADGE_SHOW = "is_desktop_red_badge_show";
    public static final String RED_BADGE_LAST_LAST_TIME_PARAS = "red_badge_last_last_time_paras";
    public static final String RED_BADGE_LAST_REQUEST_TIME = "red_badge_last_request_time";
    public static final String RED_BADGE_LAST_TIME_PARAS = "red_badge_last_time_paras";
    public static final String RED_BADGE_LAUNCH_TIMES = "red_badge_launch_times";
    public static final String RED_BADGE_NEXT_QUERY_INTERVAL = "red_badge_next_query_interval";
    public static final String RED_BADGE_SESSION_KEY = "session_key";
    public static final String RED_BADGE_SHOW_TIMES = "red_badge_show_times";
    public static final String ROM = "rom";
    private Context mContext;
    private MultiProcessShared multiProcessShared;
    private static RedbadgeSetting sRedbadgeSetting;

    private RedbadgeSetting(Context arg2) {

        this.mContext = arg2.getApplicationContext();
        this.multiProcessShared = PushMultiProcessSharedProvider.getMultiprocessShared(this.mContext);
    }

    public String getDesktopRedBadgeArgs() {
        return this.multiProcessShared.getString("desktop_red_badge_args", "");
    }

    public static RedbadgeSetting getInstance(Context arg2) {
        RedbadgeSetting v0_1;
        Class v1 = RedbadgeSetting.class;
        synchronized (v1) {
            if (RedbadgeSetting.sRedbadgeSetting == null) {
                RedbadgeSetting.sRedbadgeSetting = new RedbadgeSetting(arg2);
            }

            v0_1 = RedbadgeSetting.sRedbadgeSetting;
        }
        return v0_1;
    }

    public int getRedBadgeBadgeShowTimes() {
        return this.multiProcessShared.getInt("red_badge_show_times", 0);
    }

    public String getRedBadgeLastLastTimeParas() {
        return this.multiProcessShared.getString("red_badge_last_last_time_paras", "");
    }

    public long getRedBadgeLastRequestTime() {
        return this.multiProcessShared.getLong("red_badge_last_request_time", 0);
    }

    public String getRedBadgeLastTimeParas() {
        return this.multiProcessShared.getString("red_badge_last_time_paras", "");
    }

    public int getRedBadgeLaunchTimes() {
        return this.multiProcessShared.getInt("red_badge_launch_times", 0);
    }

    public int getRedBadgeNextQueryInterval() {
        return this.multiProcessShared.getInt("red_badge_next_query_interval", 600);
    }

    public String getRedBadgeSessionKey() {
        return this.multiProcessShared.getString("session_key", "");
    }

    public String getRom() {
        return this.multiProcessShared.getString("rom", "");
    }

    public boolean isDesktopRedBadgeShow() {
        return this.multiProcessShared.getBoolean("is_desktop_red_badge_show", false);
    }

    public void setDesktopRedBadgeArgs(String arg3) {
        this.multiProcessShared.edit().putString("desktop_red_badge_args", arg3).apply();
    }

    public void setIsDesktopRedBadgeShow(boolean arg3) {
        this.multiProcessShared.edit().putBoolean("is_desktop_red_badge_show", arg3).apply();
    }

    public void setRedBadgeBadgeShowTimes(int arg3) {
        this.multiProcessShared.edit().putInt("red_badge_show_times", arg3).apply();
    }

    public void setRedBadgeLastLastTimeParas(String arg3) {
        this.multiProcessShared.edit().putString("red_badge_last_last_time_paras", arg3).apply();
    }

    public void setRedBadgeLastRequestTime(long arg4) {
        this.multiProcessShared.edit().putLong("red_badge_last_request_time", arg4).apply();
    }

    public void setRedBadgeLastTimeParas(String arg3) {
        this.multiProcessShared.edit().putString("red_badge_last_time_paras", arg3).apply();
    }

    public void setRedBadgeLaunchTimes(int arg3) {
        this.multiProcessShared.edit().putInt("red_badge_launch_times", arg3).apply();
    }

    public void setRedBadgeNextQueryInterval(int arg3) {
        this.multiProcessShared.edit().putInt("red_badge_next_query_interval", arg3).apply();
    }

    public void setRedBadgeSessionKey(String arg3) {
        this.multiProcessShared.edit().putString("session_key", arg3).apply();
    }

    public void setRom(String arg3) {
        this.multiProcessShared.edit().putString("rom", arg3).apply();
    }
}

